package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TEquipmentMMapper;
import com.ruoyi.system.domain.TEquipmentM;
import com.ruoyi.system.service.ITEquipmentMService;
import com.ruoyi.common.core.text.Convert;

/**
 * 工单执行列Service业务层处理
 * 
 * @author wuym
 * @date 2021-07-04
 */
@Service
public class TEquipmentMServiceImpl implements ITEquipmentMService 
{
    @Autowired
    private TEquipmentMMapper tEquipmentMMapper;

    /**
     * 查询工单执行列
     * 
     * @param id 工单执行列ID
     * @return 工单执行列
     */
    @Override
    public TEquipmentM selectTEquipmentMById(Long id)
    {
        return tEquipmentMMapper.selectTEquipmentMById(id);
    }

    /**
     * 查询工单执行列列表
     * 
     * @param tEquipmentM 工单执行列
     * @return 工单执行列
     */
    @Override
    public List<TEquipmentM> selectTEquipmentMList(TEquipmentM tEquipmentM)
    {
        return tEquipmentMMapper.selectTEquipmentMList(tEquipmentM);
    }

    /**
     * 新增工单执行列
     * 
     * @param tEquipmentM 工单执行列
     * @return 结果
     */
    @Override
    public int insertTEquipmentM(TEquipmentM tEquipmentM)
    {
        tEquipmentM.setCreateTime(DateUtils.getNowDate());
        return tEquipmentMMapper.insertTEquipmentM(tEquipmentM);
    }

    /**
     * 修改工单执行列
     * 
     * @param tEquipmentM 工单执行列
     * @return 结果
     */
    @Override
    public int updateTEquipmentM(TEquipmentM tEquipmentM)
    {
        tEquipmentM.setUpdateTime(DateUtils.getNowDate());
        return tEquipmentMMapper.updateTEquipmentM(tEquipmentM);
    }

    /**
     * 删除工单执行列对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTEquipmentMByIds(String ids)
    {
        return tEquipmentMMapper.deleteTEquipmentMByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工单执行列信息
     * 
     * @param id 工单执行列ID
     * @return 结果
     */
    @Override
    public int deleteTEquipmentMById(Long id)
    {
        return tEquipmentMMapper.deleteTEquipmentMById(id);
    }
}
